package com.advice;

import org.springframework.aop.MethodBeforeAdvice;

import java.lang.reflect.Method;
import java.util.Arrays;

/**
 * 前置增强类
 */

public class BeforeService implements MethodBeforeAdvice {
    @Override
    public void before(Method method, Object[] args, Object target) throws Throwable {
        System.out.println("----------前置增强start-------------");
        System.out.println(target+" 的"+method.getName()+" 方法,参数是+" + Arrays.toString(args));
        System.out.println("----------前置增强end-------------");
    }
}
